package com.syh.jn.scm.domain.downstream.event;

import com.syh.core.ddd.domain.DomainEvent;
import com.syh.jn.scm.domain.downstream.entity.finance.DownCostBill;

/**
 * 下游费用单事件
 */
public class DownCostBillEvent extends DomainEvent<DownCostBill> {
  public static final String DOWNSTREAM_COST_BILL_CREATE = "downstreamCostBillCreate";
  public static final String DOWNSTREAM_COST_BILL_DESTROY = "downstreamCostBillDestroy";
  public static final String DOWNSTREAM_COST_BILL_STATE_CONFIRM = "downstreamCostBillStateConfirm";
  public static final String DOWNSTREAM_COST_BILL_UN_CONFIRM = "downstreamCostBillStateUnConfirm";

  /**
   * 费用单创建事件
   *
   * @param values
   * @return
   */
  public static DownCostBillEvent buildCreate(Object[] values) {
    DownCostBillEvent downCostBillEvent = new DownCostBillEvent();
    downCostBillEvent.eventName = DOWNSTREAM_COST_BILL_CREATE;
    downCostBillEvent.values = values;
    return downCostBillEvent;
  }

  /**
   * 费用单销毁事件
   *
   * @param values
   * @return
   */
  public static DownCostBillEvent buildDestroy(Object[] values) {
    DownCostBillEvent downCostBillEvent = new DownCostBillEvent();
    downCostBillEvent.eventName = DOWNSTREAM_COST_BILL_DESTROY;
    downCostBillEvent.values = values;
    return downCostBillEvent;
  }

  /**
   * 下游确认费用单
   *
   * @param values
   * @return
   */
  public static DownCostBillEvent buildDownCostBillStateConfirmEvent(Object[] values) {
    DownCostBillEvent downstreamCostBillEvent = new DownCostBillEvent();
    downstreamCostBillEvent.eventName = DOWNSTREAM_COST_BILL_STATE_CONFIRM;
    downstreamCostBillEvent.values = values;
    return downstreamCostBillEvent;
  }

  /**
   * 下游取消确认
   *
   * @param values
   * @return
   */
  public static DownCostBillEvent buildDownCostBillStateUnConfirmEvent(Object[] values) {
    DownCostBillEvent downstreamCostBillEvent = new DownCostBillEvent();
    downstreamCostBillEvent.eventName = DOWNSTREAM_COST_BILL_UN_CONFIRM;
    downstreamCostBillEvent.values = values;
    return downstreamCostBillEvent;
  }
}
